<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../common/css/insert.css">
<title>CommentDelete</title>
</head>
<body>
	<div id="searchInfo">
		<form id="searchBook" method="post" action="">
			<div class="form-group">
				<label>按评论ID删除：</label> <input class="form-control" id="commentIdDelete"
					type="text" name="comment_id" placeholder="输入评论id">
			</div>
			<div class="form-group">
				<label>按用户ID删除：</label> <input class="form-control" id="userIdDelete"
					type="text" name="user_id" placeholder="输入用户id">
			</div>
			<div class="form-group">
				<label>按书籍ID删除：</label> <input class="form-control" id="bookIdDelete"
					type="text" name="book_id" placeholder="输入书籍id">
			</div>
			<div class="form-group">
				<label>按时间删除：</label> <input class="form-control" id="timeStart"
					type="text" name="time_start" placeholder="输入起始时间">
				<input class="form-control" id="timeEnd"
					type="text" name="time_end" placeholder="输入终止时间">
			</div>
			<div class="form-group">
				<label>按评星删除：</label> <input class="form-control" id="starDelete"
					type="text" name="star" placeholder="输入评星">
			</div>
			<input class="btn btn-primary" type="button" value="搜索"
				onclick="search()"> <input class="btn btn-danger"
				type="reset" value="重置">
		</form>
	</div>
	<div id="searchResults">
	</div>
	
	
	<script>
	function search(){
		var commentid = $('#commentIdDelete').val();
		var userid = $('#userid').val();
		var bookid=$('#idDelete').val();
		var timeStart=$('#timeStart').val();
		var timeEnd=$('#timeEnd').val();
		var star=$('#starDelete').val();
		
		var jo = {
			"commentid":commentid,
			"userid":userid,
			"bookid":bookid,
			"timeStart":timeStart,
			"timeEnd":timeEnd,
			"star":star,
		};
		
		
		$(document).ready(function() {
			$.ajax({
				type : "post",
				url : "../searchBook.action",
				dataType : "json",
				data : jo,
				success : function(data,textStatus) {
					alert("删除成功");
				}
			});
		)};
	}
	</script>
</body>
</html>